<template>
  <div class="boxjddp">
    <el-row :gutter="10">
      <el-col :span="24">
        <div class="header">
          <h2>{{ $t("commons.base") }}</h2>
          <div class="leftimg"></div>
          <div class="rightimg"></div>
        </div>
      </el-col>
    </el-row>
    <el-row :gutter="10">
      <el-col :span="6">
        <div class="edata">
          <div style="text-align: center;">
            <div class="boxtitle">{{ $t("dataBoard.BlockInformation") }}</div>
          </div>

          <div class="boxrows">
            <el-carousel :interval="5000" style="height:100%" direction="vertical">
              <el-carousel-item v-for="item in 3" :key="item">
                <div class="boxerw">
                  <div class="titles">
                      <div>
                        锦州
                      </div>
                      <div class="titnum">
                        1
                      </div>
                  </div>
                </div>
              </el-carousel-item>
            </el-carousel>
          </div>

        </div>
      </el-col>
      <el-col :span="12">
        <div style="width:100%;">
            <div>
              <div class="box2ss">{{ $t("dataBoard.RealTimeWellInformation") }}</div>
            </div>
            <div class="boxlat">
                <el-row :gutter="2" style="text-align: center;">
                  <el-col :span="8" class="cenbox">
                    <div class="cenbox-num">5</div>
                    <div class="cenbox-nr">{{ $t("dataBoard.welltxt3") }}</div>
                  </el-col>
                  <el-col :span="8" class="cenbox">
                    <div class="cenbox-num">5</div>
                    <div class="cenbox-nr">{{ $t("dataBoard.welltxt2") }}</div>
                  </el-col>
                  <el-col :span="8" class="cenbox">
                    <div class="cenbox-num">5</div>
                    <div class="cenbox-nr">{{ $t("dataBoard.welltxt1") }}</div>
                  </el-col>
                </el-row>
            </div>
            <div>
              <linegraph :id="'myEchart1'" :data="option1" class="edata" style="height:350px;width:auto;"></linegraph>
            </div>
        </div>
      </el-col>
      <el-col :span="6">
        <div class="edata">
          <div style="text-align: center;">
            <div class="boxtitle">{{ $t("dataBoard.RigType") }}</div>
          </div>
          <div class="boxrows">
            <el-carousel :interval="5000" style="height:100%" direction="vertical">
              <el-carousel-item v-for="item in 3" :key="item">
                <div class="boxerws">
                  <div class="titles">
                      <div>
                        自升式平台
                      </div>
                      <div class="titnum">
                        10
                      </div>
                  </div>
                </div>
              </el-carousel-item>
            </el-carousel>
          </div>
        </div>
      </el-col>
    </el-row>
    <el-row :gutter="10">
      <el-col :span="24" >
        <div class="edata">
          <div style="padding-top: 21px;">
            <div class="box2ss">{{ $t("dataBoard.RealTimeWellDataInformation") }}</div>
          </div>
          <template style="height: calc(100% - 140px);">
          <el-table :data="tables" size="mini" stripe >
            <el-table-column type="index" label="序号" width="80"></el-table-column>
            <el-table-column prop="roleName" :label="$t('dataBoard.wellName')"> </el-table-column>
            <el-table-column prop="describe" :label="$t('dataBoard.platformName')"> </el-table-column>
            <el-table-column prop="createUserName" :label="$t('dataBoard.totDepth')"> </el-table-column>
            <el-table-column prop="createTime" :label="$t('dataBoard.tvdDepth')"> </el-table-column>
            <el-table-column prop="createTime" :label="$t('dataBoard.bitDepth')"> </el-table-column>
            <el-table-column prop="createTime" :label="$t('dataBoard.wellState')"> </el-table-column>
          </el-table>
        </template>

        <!--工具条-->
        <el-col class="pages">
          <el-pagination
            background
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            :page-sizes="[10, 20, 50, 100]"
            :page-size="10"
            layout="total, sizes, prev, pager, next, jumper"
            :current-page="pageSize"
            :total="total"
          >
          </el-pagination>
        </el-col>
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import linegraph from '@/components/component/Linegraph'  //echart子组件
export default {
components:{
      linegraph,
  },
  data(){
    return {
      option1:{
        title: {
          top:10,
          left: 410,
          text: "井数统计",
          textStyle: {
            color: this.$store.state.theme == "dark" ? "#fff" : "#000",
          },
        },
        color: ["#2FC7C7", "#522FC7", "#00A2E8"], //图例颜色
        tooltip: {
          trigger: "axis",
          axisPointer: {
            type: "shadow", // 默认为直线，可选为：'line' | 'shadow'
          },
        },
        legend: {
          top:10,
          right: 40,
          textStyle: {
            color: this.$store.state.theme == "dark" ? "#fff" : "#000",
          },
          data: ["勘探井", "开发井", "调整井"],
        },
        xAxis: {
          type: "category",
          axisLine: {
            //设置文字颜色
            lineStyle: {
              color: this.$store.state.theme == "dark" ? "#fff" : "#000",
            },
          },
          data: [],
        },
        yAxis: {
          type: "value",
          splitLine: {
            //设置网格线属性
            show: true,
            lineStyle: {
              color: ["#2E427C"],
              width: 1,
              type: "dotted",
            },
          },
          axisLine: {
            //设置文字颜色
            lineStyle: {
              color: this.$store.state.theme == "dark" ? "#fff" : "#000",
            },
          },
        },
        series: [
          {
            name: "勘探井",
            type: "bar",
            data: [],
          },
          {
            name: "开发井",
            type: "bar",
            data: [],
          },
          {
            name: "调整井",
            type: "bar",
            data: [],
          },
        ],
      },


    }
  }
}
</script>

<style lang="less" scoped>
.el-row {
  margin-bottom: 10px;
  &:last-child {
    margin-bottom: 0;
  }
}
  .header {
  width: 100%;
  height: 70px;
  text-align: center;
  line-height: 50px;
  font-size: 20px;
  color: white;
  background-image: url("../../assets/show1.png");
  background-repeat: no-repeat;
  background-size: 100% 70px;

  .leftimg {
    float: left;
    width: 32%;
    height: 30%;
    background-image: url("../../assets/show2.png");
    background-repeat: no-repeat;
    background-size: 100% 15px;
  }
  .rightimg {
    float: right;
    width: 32%;
    height: 30%;
    background-image: url("../../assets/show3.png");
    background-repeat: no-repeat;
    background-size: 100% 15px;
  }
}
.edata {
  height: 475px;
  padding: 2px 10px 10px 10px;
  background-image: url("../../assets/border.png");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  /deep/ table{
    width: 100% !important;
  }
  /deep/.el-table__body-wrapper::-webkit-scrollbar {
    width: 0px !important;
    height: 0;
  }
}
.boxtitle{
  text-align: center;
  width: calc(100% - 60px);
  height: 40px;
  font-size: 20px;
  color: rgb(255, 255, 255);
  font-weight: bold;
  margin-left: 28px;
  background-color: rgb(18, 37, 73);
  line-height: 40px;
  border-bottom-right-radius: 15px;
  border-bottom-left-radius: 15px;
  letter-spacing: 2px;
}
.boxrows{
  height: calc(100% - 50px);
  overflow: auto;
}
.boxjddp{
  overflow: auto;
  height: 100%;
  overflow-x: hidden;
}
.boxjddp::-webkit-scrollbar{
    width:5px;
    height:5px;
}
.boxjddp::-webkit-scrollbar-track{
    background: #efefef00;
    border-radius:2px;
}
.boxjddp::-webkit-scrollbar-thumb{
    background: #bfbfbf;
    border-radius:10px;
}
.boxjddp::-webkit-scrollbar-thumb:hover{
    background: #b6dbf0;
}
.boxjddp::-webkit-scrollbar-corner{
    background: #ffffff;
}
.boxrows::-webkit-scrollbar{
    width:5px;
    height:5px;
}
.boxrows::-webkit-scrollbar-track{
    background: #efefef00;
    border-radius:2px;
}
.boxrows::-webkit-scrollbar-thumb{
    background: #bfbfbf;
    border-radius:10px;
}
.boxrows::-webkit-scrollbar-thumb:hover{
    background: #b6dbf0;
}
.boxrows::-webkit-scrollbar-corner{
    background: #ffffff;
}

.boxerw{
  width: 27%;
  text-align: center;
  height: 120px;
  background-color: #102a47;
  margin: 10px;
  display: inline-block;
  vertical-align: top;
  background-image: url("../../assets/borderbox.png");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  .titles{
    font-size: 16px;
    padding-top: 25%;
  }
  .titnum{
    font-size: 30px;
    color: #00dbff;
    padding-top: 10%;
  }
}
.boxerws{
  width: 27%;
  text-align: center;
  height: 120px;
  background-color: #102a47;
  margin: 10px;
  display: inline-block;
  vertical-align: top;
  background-image: url("../../assets/rightbox.png");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  .titles{
    font-size: 16px;
    padding-top: 25%;
  }
  .titnum{
    font-size: 30px;
    color: #00dbff;
    padding-top: 10%;
  }
}
.box2ss{
  text-align: center;
  width: calc(100% - 330px);
  height: 40px;
  font-size: 20px;
  color: #ffffff;
  font-weight: bold;
  margin: 0 auto;
  background-color: #122549;
  line-height: 40px;
  border-bottom-right-radius: 15px;
  border-bottom-left-radius: 15px;
  letter-spacing: 2px;
  margin-top: -14px;
}
.cenbox{
  height: 80px;
  border: 1px solid #1293F6;
  border-radius: 5px;
  width: 29%;
  margin: 10px;
}
.cenbox-num{
  height: 50px;
  line-height: 50px;
  font-size: 25px;
  background-color: #1C80A3;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  background-image: linear-gradient(#0EF7E7 , #1F6492);
}
.cenbox-nr{
  height: 28px;
  background-color: #121a31;
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
  line-height: 28px;
}
.boxlat{
  width: calc(100% - 370px);
  margin: 0 auto;
  text-align: center;
}
</style>